/*
* pps_bom
*/
package com.pitop.assembly.api;

import com.pitop.assembly.entity.Assembly;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.ArrayList;
import java.util.List;

/**
 * 组件 api请求熔断器 熔断实现
 *
 * @author berton
 */
@Component
public class AssemblyFeignApiImpl implements AssemblyFeignApi {
    /**
     * 查询Assembly一个详情信息
     *
     * @param id
     * @param code 编码
     * @return Assembly
     */
    @Override
    public Assembly load(@RequestParam("id") Long id, @RequestParam("code") String code) {
        return new Assembly();
    }

    /**
     * 查询Assembly一个详情信息,(将查询关联数据)
     *
     * @param id
     * @param code 编码
     * @return Assembly
     */
    @Override
    public Assembly get(@RequestParam("id") Long id, @RequestParam("code") String code) {
        return new Assembly();
    }


    /**
     * 根据条件id查询Assembly一个详情信息
     *
     * @param id
     * @return Assembly
     */
    @Override
    public Assembly loadById(@RequestParam("id") Long id) {
        return new Assembly();
    }

    /**
     * 根据条件code查询Assembly一个详情信息
     *
     * @param code 编码
     * @return Assembly
     */
    @Override
    public Assembly loadByCode(@RequestParam("code") String code) {
        return null;
    }

    @Override
    public Assembly loadByName(@RequestParam("name") String name) {
        return null;
    }

    /**
     * 根据条件assemblyCode查询Assembly一个详情信息
     *
     * @param assemblyCode 组件代码
     * @return Assembly
     */
    @Override
    public Assembly loadByAssemblyCode(@RequestParam("assemblyCode") String assemblyCode) {
        return null;
    }

    /**
     * 根据条件id查询Assembly一个详情信息,(将查询关联数据)
     *
     * @param id
     * @return Assembly
     */
    @Override
    public Assembly getById(@RequestParam("id") Long id) {
        return new Assembly();
    }

    /**
     * 根据条件code查询Assembly一个详情信息,(将查询关联数据)
     *
     * @param code 编码
     * @return Assembly
     */
    @Override
    public Assembly getByCode(@RequestParam("code") String code) {
        return new Assembly();
    }

    /**
     * 查询Assembly信息集合
     *
     * @return 分页对象
     */
    @Override
    public List<Assembly> list(@RequestBody Assembly assembly, int curPage, int pageSize) {
        return new ArrayList();
    }


    /**
     * 根据bom编码查询组件信息
     *
     * @return 分页对象
     */
    @Override
    public List<Assembly> listForBom(@RequestParam("bomCode") String bomCode, @RequestParam("name") String name, @RequestParam("curPage") int curPage, @RequestParam("pageSize") int pageSize) {
        return null;
    }

    /**
     * 查询Assembly信息集合
     *
     * @return 分页对象
     */
    @Override
    public List<Assembly> listByPk(Long id, String code, int curPage, int pageSize) {
        return new ArrayList();
    }

    @Override
    public Integer count(@RequestParam("id") Long id, @RequestParam("code") String code) {
        return 0;
    }

    @Override
    public Integer count(@RequestBody Assembly assembly) {
        return 0;
    }

    @Override
    public Integer countForBom(@RequestParam("bomCode") String bomCode, @RequestParam("name") String name) {
        return null;
    }

    /**
     * 创建Assembly
     *
     * @return Assembly
     */
    @Override
    public Assembly build(@RequestBody Assembly assembly, @RequestParam("account") String account, @RequestParam("code") String code) {
        return new Assembly();
    }

    /**
     * 修改Assembly
     *
     * @return Assembly
     */
    @Override
    public Assembly modify(@RequestBody Assembly assembly,@RequestParam("account") String account,@RequestParam("accountCode") String accountCode) {
        return new Assembly();
    }

    @Override
    public Assembly addMaterial(@RequestParam("code") String code, @RequestParam("materialCodes") String materialCodes) {
        return new Assembly();
    }

    /**
     * 复制组件
     *
     * @param code 组件编码
     * @param account
     *@param accountCode @return Assembly
     */
    @Override
    public Assembly copy(@RequestParam("code") String code,@RequestParam("account")  String account,@RequestParam("accountCode")  String accountCode) {
        return null;
    }

    /**
     * 修改组件状态
     *
     * @return Assembly
     */
    @Override
    public Assembly updateState(@RequestParam("code") String code, @RequestParam("state") String state) {
        return new Assembly();
    }

    /**
     * 删除Assembly
     */
    @Override
    public void delete(@RequestParam("id") Long id, @RequestParam("code") String code) {
        return;
    }
}
